Fix issues with incorrect variable assignment of key, secret, and token obtained from Instance Metadata. #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See issue https://github.com/livelycode/aws-lib/issues/83 .
When running in AWS with an instance role, setting
accessKeyId
andsecretAccessKey
to null does not result in the key, secret, and token being read correctly from the Instance Metadata service.Or rather these values are being obtained, but they are being assigned to the variables that are then not referenced.
Here in
lib/aws.js
you are settingsecurityToken
,accessKeyId
, andsecretAccessKey
prior to the values inobj
being reset with the values obtained from Instance Metadata.Then when you reference the scope variables later they are still null even though you have updated
obj
.This pull request updates
lib/aws.js
to fix this issue.